<?php
include 'config.php';
	$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die ("Could not execute query");
	$query = "SELECT * FROM d3";

	$result = mysqli_query($con,$query) or die ("Could not SELECT lexid, context1 FROM d3");
	
	$num =  mysqli_num_rows($result);
		
	$data = array();
    
    for ($x = 0; $x < $num ; $x++) {
        $data[] = mysqli_fetch_assoc($result);
    }
    echo json_encode($data);   
?>